
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'color.dart';

Widget ListEmptyContainer({required Widget child, bool showChild = true, required Text emptyTitle,required Image emptyImage,double? offsetY}) {
  return showChild ? child : Container(alignment: Alignment.center,child: _emptyView(title: emptyTitle,image: emptyImage,offsetY: offsetY));
}

Widget _emptyView({required Text title, required Image image, double? offsetY}) {
  return Container(
    width: double.infinity,
    color: ColorManager.colorFFFFFF,
    child: Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        SizedBox(height: offsetY ?? 100.w,),
        image,
        SizedBox(height: 12.w,),
        title,
      ],
    ),
  );
}
